package com.zhiyou100.loans.servlet.user;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.zhiyou100.loans.service.LendbillService;
import com.zhiyou100.loans.service.impl.LendbillServiceImpl;

import net.sf.json.JSONObject;

/**
 * 查询总出借金额的servlet
 *	
 */
@WebServlet("/LendTotalServlet")
public class LendTotalServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
       
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		LendbillService lbs = new LendbillServiceImpl();
		String lenderid = request.getParameter("lenderid");
		
		JSONObject data = lbs.selectTotalLendmoney(lenderid);
		response.getWriter().println(data);
	}

}
